package com.awb.rabbitmqdemo.simple;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 生产者 
 * @author anwenbiao
 */
@Component
public class SimpleProducer {

    @Autowired
    private RabbitTemplate rabbitTemplate;
    
    public void send(){
        String message = "简单模式发送";
        rabbitTemplate.convertAndSend("simple_queue",message);
    }
}
